package com.only4play.starfish.common;

import lombok.Getter;

@Getter
public enum RespCodeEnum {
    SUCCESS(0, "成功"),
    FAILURE(-1, "失败"),
    SYSERR(202, "系统错误"),
    PARAMERR(203, "参数校验失败"),
    EMPTYDATA(204, "数据为空"),
    ALREADYEXIST(204, "数据已存在"),
    AUTHERROR(205, "没有此用户或者密码错误"),
    SAMEUSER(206, "用户已存在"),
    BUSINESSERR(207, "业务异常"),
    UPLOADFILEERR(208, "文件上传失败"),
    SOCKETSENDERR(209, "Socket 发送失败"),
    NEEDLOGIN(210, "请先登录");

    private final Integer errorCode;

    private final String errorMessage;

    private RespCodeEnum(Integer errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
}
